﻿<ribbon:RibbonWindow x:Class="Main"
   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
		Title="MainWindow" 
		x:Name="Main"
		Width="640" Height="480">
    <ribbon:RibbonWindow.Resources>

        <DataTemplate x:Key="listBoxTemplate">
            <Border BorderBrush="Blue"
                    BorderThickness="1"
                    CornerRadius="1"
                    Margin="1">
                <StackPanel Orientation="Vertical">
                    <TextBlock Text="{Binding WindowName}" 
                               Foreground="Green" 
                               FontWeight="Bold"
                                   Name="username" Margin="1"/>
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0">
                        <Label Content ="Department : " 
                               Foreground="Black" HorizontalAlignment="Left"  VerticalAlignment="Center" />
                        <Label Content="{Binding WindowName}" 
                               Foreground="Green" Name="PersonCode" HorizontalAlignment="Left"  VerticalAlignment="Center"/>
                    </StackPanel>
                </StackPanel>
            </Border>
        </DataTemplate>

    </ribbon:RibbonWindow.Resources>


    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <ribbon:Ribbon x:Name="Ribbon">
            <ribbon:Ribbon.ApplicationMenu>
                <ribbon:RibbonApplicationMenu SmallImageSource="Images\SmallIcon.png">
                    <ribbon:RibbonApplicationMenuItem Header="Hello _Ribbon"
													  x:Name="MenuItem1"
													  ImageSource="Images\LargeIcon.png"/>
                </ribbon:RibbonApplicationMenu>
            </ribbon:Ribbon.ApplicationMenu>
            <ribbon:RibbonTab x:Name="HomeTab"
							  Header="Home">
                <ribbon:RibbonGroup x:Name="Group1"
									Header="Group1">
                    <ribbon:RibbonButton x:Name="ButtonExpense"
										 LargeImageSource="Images\LargeIcon.png"
										 Label="Button1" />
                    <ribbon:RibbonButton x:Name="ButtonIncome"
										 LargeImageSource="Images\LargeIcon.png"
										 Label="Button1" />

                    <ribbon:RibbonButton x:Name="Button2"
										 SmallImageSource="Images\SmallIcon.png"
										 Label="Button2" />
                    <ribbon:RibbonButton x:Name="Button3"
										 SmallImageSource="Images\SmallIcon.png"
										 Label="Button3" />
                    <ribbon:RibbonButton x:Name="Button4"
										 SmallImageSource="Images\SmallIcon.png"
										 Label="Button4" />

                </ribbon:RibbonGroup>

                

                <ribbon:RibbonGroup Header="TestGROUP" ItemsSource="{Binding ElementName=Main, Path=oWindowList}" >
                    <ribbon:RibbonGroup.ItemTemplate>
                        <DataTemplate >
                            <ribbon:RibbonButton  Label="{Binding Path=WindowName}" Tag="{Binding Path=WindowID}" LargeImageSource="{Binding Path=WindowImage}" x:Name="WindowName"  Click="RibbonButtonExpense_Click"   />
                        </DataTemplate>
                    </ribbon:RibbonGroup.ItemTemplate>


                </ribbon:RibbonGroup>
            </ribbon:RibbonTab>
        </ribbon:Ribbon>
        <ListBox Name="listBoxPersons"     Grid.Row="1"
                         DisplayMemberPath="WindowName"
                         ItemsSource="{Binding ElementName=Main, Path=oWindowList}"
                         HorizontalContentAlignment="Stretch"                         
                         
                         VerticalAlignment="Top"  Height="100">
        </ListBox>

    </Grid>


</ribbon:RibbonWindow>
